Optimal. Leaf size=78 \[ \frac {(b c-a d)^2 (a+b x)^{1+m}}{b^3 (1+m)}+\frac {2 d (b c-a d) (a+b x)^{2+m}}{b^3 (2+m)}+\frac {d^2 (a+b x)^{3+m}}{b^3 (3+m)} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.03, antiderivative size = 78, normalized size of antiderivative = 1.00, number of steps
used = 2, number of rules used = 1, integrand size = 15, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.067, Rules used = {45}
\begin {gather*} \frac {(b c-a d)^2 (a+b x)^{m+1}}{b^3 (m+1)}+\frac {2 d (b c-a d) (a+b x)^{m+2}}{b^3 (m+2)}+\frac {d^2 (a+b x)^{m+3}}{b^3 (m+3)} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 45
Rubi steps
\begin {align*} \int (a+b x)^m (c+d x)^2 \, dx &=\int \left (\frac {(b c-a d)^2 (a+b x)^m}{b^2}+\frac {2 d (b c-a d) (a+b x)^{1+m}}{b^2}+\frac {d^2 (a+b x)^{2+m}}{b^2}\right ) \, dx\\ &=\frac {(b c-a d)^2 (a+b x)^{1+m}}{b^3 (1+m)}+\frac {2 d (b c-a d) (a+b x)^{2+m}}{b^3 (2+m)}+\frac {d^2 (a+b x)^{3+m}}{b^3 (3+m)}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.08, size = 67, normalized size = 0.86 \begin {gather*} \frac {(a+b x)^{1+m} \left (\frac {(b c-a d)^2}{1+m}+\frac {2 d (b c-a d) (a+b x)}{2+m}+\frac {d^2 (a+b x)^2}{3+m}\right )}{b^3} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Mathics [C] Result contains higher order function than in optimal. Order 9 vs. order 3 in
optimal.
time = 6.81, size = 1256, normalized size = 16.10 \begin {gather*} \text {Piecewise}\left [\left \{\left \{\frac {x \left (3 c^2+3 c d x+d^2 x^2\right ) a^m}{3},b\text {==}0\right \},\left \{\frac {a^2 d^2 \left (3+2 \text {Log}\left [\frac {a+b x}{b}\right ]\right )+2 a b d \left (-c+2 d x+2 d x \text {Log}\left [\frac {a+b x}{b}\right ]\right )+b^2 \left (-c^2-4 c d x+2 d^2 x^2 \text {Log}\left [\frac {a+b x}{b}\right ]\right )}{2 b^3 \left (a^2+2 a b x+b^2 x^2\right )},m\text {==}-3\right \},\left \{\frac {-2 a^2 d^2 \left (1+\text {Log}\left [\frac {a+b x}{b}\right ]\right )+2 a b d \left (c+c \text {Log}\left [\frac {a+b x}{b}\right ]-d x \text {Log}\left [\frac {a+b x}{b}\right ]\right )+b^2 \left (-c^2+2 c d x \text {Log}\left [\frac {a+b x}{b}\right ]+d^2 x^2\right )}{b^3 \left (a+b x\right )},m\text {==}-2\right \},\left \{\frac {a^2 d^2 \text {Log}\left [\frac {a+b x}{b}\right ]-a b d \left (2 c \text {Log}\left [\frac {a+b x}{b}\right ]+d x\right )+\frac {b^2 \left (2 c^2 \text {Log}\left [\frac {a+b x}{b}\right ]+4 c d x+d^2 x^2\right )}{2}}{b^3},m\text {==}-1\right \}\right \},\frac {2 a^3 d^2 \left (a+b x\right )^m}{6 b^3+11 b^3 m+6 b^3 m^2+b^3 m^3}-\frac {6 a^2 b c d \left (a+b x\right )^m}{6 b^3+11 b^3 m+6 b^3 m^2+b^3 m^3}-\frac {2 a^2 b c d m \left (a+b x\right )^m}{6 b^3+11 b^3 m+6 b^3 m^2+b^3 m^3}-\frac {2 a^2 b d^2 m x \left (a+b x\right )^m}{6 b^3+11 b^3 m+6 b^3 m^2+b^3 m^3}+\frac {6 a b^2 c^2 \left (a+b x\right )^m}{6 b^3+11 b^3 m+6 b^3 m^2+b^3 m^3}+\frac {5 a b^2 c^2 m \left (a+b x\right )^m}{6 b^3+11 b^3 m+6 b^3 m^2+b^3 m^3}+\frac {a b^2 c^2 m^2 \left (a+b x\right )^m}{6 b^3+11 b^3 m+6 b^3 m^2+b^3 m^3}+\frac {6 a b^2 c d m x \left (a+b x\right )^m}{6 b^3+11 b^3 m+6 b^3 m^2+b^3 m^3}+\frac {2 a b^2 c d m^2 x \left (a+b x\right )^m}{6 b^3+11 b^3 m+6 b^3 m^2+b^3 m^3}+\frac {a b^2 d^2 m x^2 \left (a+b x\right )^m}{6 b^3+11 b^3 m+6 b^3 m^2+b^3 m^3}+\frac {a b^2 d^2 m^2 x^2 \left (a+b x\right )^m}{6 b^3+11 b^3 m+6 b^3 m^2+b^3 m^3}+\frac {6 b^3 c^2 x \left (a+b x\right )^m}{6 b^3+11 b^3 m+6 b^3 m^2+b^3 m^3}+\frac {5 b^3 c^2 m x \left (a+b x\right )^m}{6 b^3+11 b^3 m+6 b^3 m^2+b^3 m^3}+\frac {b^3 c^2 m^2 x \left (a+b x\right )^m}{6 b^3+11 b^3 m+6 b^3 m^2+b^3 m^3}+\frac {6 b^3 c d x^2 \left (a+b x\right )^m}{6 b^3+11 b^3 m+6 b^3 m^2+b^3 m^3}+\frac {8 b^3 c d m x^2 \left (a+b x\right )^m}{6 b^3+11 b^3 m+6 b^3 m^2+b^3 m^3}+\frac {2 b^3 c d m^2 x^2 \left (a+b x\right )^m}{6 b^3+11 b^3 m+6 b^3 m^2+b^3 m^3}+\frac {2 b^3 d^2 x^3 \left (a+b x\right )^m}{6 b^3+11 b^3 m+6 b^3 m^2+b^3 m^3}+\frac {3 b^3 d^2 m x^3 \left (a+b x\right )^m}{6 b^3+11 b^3 m+6 b^3 m^2+b^3 m^3}+\frac {b^3 d^2 m^2 x^3 \left (a+b x\right )^m}{6 b^3+11 b^3 m+6 b^3 m^2+b^3 m^3}\right ] \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] Leaf count of result is larger than twice the leaf count of optimal. \(158\) vs.
\(2(78)=156\).
time = 0.19, size = 159, normalized size = 2.04
method | result | size |
gosper | \(\frac {\left (b x +a \right )^{1+m} \left (b^{2} d^{2} m^{2} x^{2}+2 b^{2} c d \,m^{2} x +3 b^{2} d^{2} m \,x^{2}-2 a b \,d^{2} m x +b^{2} c^{2} m^{2}+8 b^{2} c d m x +2 b^{2} x^{2} d^{2}-2 a b c d m -2 a b \,d^{2} x +5 b^{2} c^{2} m +6 b^{2} c d x +2 a^{2} d^{2}-6 a b c d +6 b^{2} c^{2}\right )}{b^{3} \left (m^{3}+6 m^{2}+11 m +6\right )}\) | \(159\) |
norman | \(\frac {d^{2} x^{3} {\mathrm e}^{m \ln \left (b x +a \right )}}{3+m}+\frac {a \left (b^{2} c^{2} m^{2}-2 a b c d m +5 b^{2} c^{2} m +2 a^{2} d^{2}-6 a b c d +6 b^{2} c^{2}\right ) {\mathrm e}^{m \ln \left (b x +a \right )}}{b^{3} \left (m^{3}+6 m^{2}+11 m +6\right )}+\frac {\left (a d m +2 b c m +6 b c \right ) d \,x^{2} {\mathrm e}^{m \ln \left (b x +a \right )}}{b \left (m^{2}+5 m +6\right )}-\frac {\left (-2 a b c d \,m^{2}-b^{2} c^{2} m^{2}+2 a^{2} d^{2} m -6 a b c d m -5 b^{2} c^{2} m -6 b^{2} c^{2}\right ) x \,{\mathrm e}^{m \ln \left (b x +a \right )}}{b^{2} \left (m^{3}+6 m^{2}+11 m +6\right )}\) | \(226\) |
risch | \(\frac {\left (b^{3} d^{2} m^{2} x^{3}+a \,b^{2} d^{2} m^{2} x^{2}+2 b^{3} c d \,m^{2} x^{2}+3 b^{3} d^{2} m \,x^{3}+2 a \,b^{2} c d \,m^{2} x +a \,b^{2} d^{2} m \,x^{2}+b^{3} c^{2} m^{2} x +8 b^{3} c d m \,x^{2}+2 d^{2} x^{3} b^{3}-2 a^{2} b \,d^{2} m x +a \,b^{2} c^{2} m^{2}+6 a \,b^{2} c d m x +5 b^{3} c^{2} m x +6 b^{3} c d \,x^{2}-2 a^{2} b c d m +5 a \,b^{2} c^{2} m +6 b^{3} c^{2} x +2 a^{3} d^{2}-6 a^{2} b c d +6 a \,b^{2} c^{2}\right ) \left (b x +a \right )^{m}}{\left (2+m \right ) \left (3+m \right ) \left (1+m \right ) b^{3}}\) | \(242\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.29, size = 138, normalized size = 1.77 \begin {gather*} \frac {2 \, {\left (b^{2} {\left (m + 1\right )} x^{2} + a b m x - a^{2}\right )} {\left (b x + a\right )}^{m} c d}{{\left (m^{2} + 3 \, m + 2\right )} b^{2}} + \frac {{\left (b x + a\right )}^{m + 1} c^{2}}{b {\left (m + 1\right )}} + \frac {{\left ({\left (m^{2} + 3 \, m + 2\right )} b^{3} x^{3} + {\left (m^{2} + m\right )} a b^{2} x^{2} - 2 \, a^{2} b m x + 2 \, a^{3}\right )} {\left (b x + a\right )}^{m} d^{2}}{{\left (m^{3} + 6 \, m^{2} + 11 \, m + 6\right )} b^{3}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] Leaf count of result is larger than twice the leaf count of optimal. 235 vs.
\(2 (78) = 156\).
time = 0.32, size = 235, normalized size = 3.01 \begin {gather*} \frac {{\left (a b^{2} c^{2} m^{2} + 6 \, a b^{2} c^{2} - 6 \, a^{2} b c d + 2 \, a^{3} d^{2} + {\left (b^{3} d^{2} m^{2} + 3 \, b^{3} d^{2} m + 2 \, b^{3} d^{2}\right )} x^{3} + {\left (6 \, b^{3} c d + {\left (2 \, b^{3} c d + a b^{2} d^{2}\right )} m^{2} + {\left (8 \, b^{3} c d + a b^{2} d^{2}\right )} m\right )} x^{2} + {\left (5 \, a b^{2} c^{2} - 2 \, a^{2} b c d\right )} m + {\left (6 \, b^{3} c^{2} + {\left (b^{3} c^{2} + 2 \, a b^{2} c d\right )} m^{2} + {\left (5 \, b^{3} c^{2} + 6 \, a b^{2} c d - 2 \, a^{2} b d^{2}\right )} m\right )} x\right )} {\left (b x + a\right )}^{m}}{b^{3} m^{3} + 6 \, b^{3} m^{2} + 11 \, b^{3} m + 6 \, b^{3}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A]
time = 0.73, size = 1506, normalized size = 19.31
result too large to display
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] Leaf count of result is larger than twice the leaf count of optimal. 385 vs.
\(2 (78) = 156\).
time = 0.00, size = 427, normalized size = 5.47 \begin {gather*} \frac {2 a^{3} d^{2} \mathrm {e}^{m \ln \left (a+b x\right )}-2 a^{2} b c d m \mathrm {e}^{m \ln \left (a+b x\right )}-6 a^{2} b c d \mathrm {e}^{m \ln \left (a+b x\right )}-2 a^{2} b d^{2} m x \mathrm {e}^{m \ln \left (a+b x\right )}+a b^{2} c^{2} m^{2} \mathrm {e}^{m \ln \left (a+b x\right )}+5 a b^{2} c^{2} m \mathrm {e}^{m \ln \left (a+b x\right )}+6 a b^{2} c^{2} \mathrm {e}^{m \ln \left (a+b x\right )}+2 a b^{2} c d m^{2} x \mathrm {e}^{m \ln \left (a+b x\right )}+6 a b^{2} c d m x \mathrm {e}^{m \ln \left (a+b x\right )}+a b^{2} d^{2} m^{2} x^{2} \mathrm {e}^{m \ln \left (a+b x\right )}+a b^{2} d^{2} m x^{2} \mathrm {e}^{m \ln \left (a+b x\right )}+b^{3} c^{2} m^{2} x \mathrm {e}^{m \ln \left (a+b x\right )}+5 b^{3} c^{2} m x \mathrm {e}^{m \ln \left (a+b x\right )}+6 b^{3} c^{2} x \mathrm {e}^{m \ln \left (a+b x\right )}+2 b^{3} c d m^{2} x^{2} \mathrm {e}^{m \ln \left (a+b x\right )}+8 b^{3} c d m x^{2} \mathrm {e}^{m \ln \left (a+b x\right )}+6 b^{3} c d x^{2} \mathrm {e}^{m \ln \left (a+b x\right )}+b^{3} d^{2} m^{2} x^{3} \mathrm {e}^{m \ln \left (a+b x\right )}+3 b^{3} d^{2} m x^{3} \mathrm {e}^{m \ln \left (a+b x\right )}+2 b^{3} d^{2} x^{3} \mathrm {e}^{m \ln \left (a+b x\right )}}{b^{3} m^{3}+6 b^{3} m^{2}+11 b^{3} m+6 b^{3}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 0.66, size = 226, normalized size = 2.90 \begin {gather*} {\left (a+b\,x\right )}^m\,\left (\frac {a\,\left (2\,a^2\,d^2-2\,a\,b\,c\,d\,m-6\,a\,b\,c\,d+b^2\,c^2\,m^2+5\,b^2\,c^2\,m+6\,b^2\,c^2\right )}{b^3\,\left (m^3+6\,m^2+11\,m+6\right )}+\frac {d^2\,x^3\,\left (m^2+3\,m+2\right )}{m^3+6\,m^2+11\,m+6}+\frac {x\,\left (-2\,a^2\,b\,d^2\,m+2\,a\,b^2\,c\,d\,m^2+6\,a\,b^2\,c\,d\,m+b^3\,c^2\,m^2+5\,b^3\,c^2\,m+6\,b^3\,c^2\right )}{b^3\,\left (m^3+6\,m^2+11\,m+6\right )}+\frac {d\,x^2\,\left (m+1\right )\,\left (6\,b\,c+a\,d\,m+2\,b\,c\,m\right )}{b\,\left (m^3+6\,m^2+11\,m+6\right )}\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________